package com.yt.order.models.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.yt.order.models.bo.WorkOrderEvaluationQueryBO;
import com.yt.order.models.bo.WorkOrderEvaluationSaveBO;
import com.yt.order.models.dto.WorkOrderEvaluationDTO;
import com.yt.order.models.vo.WorkOrderEvaluationVO;

/**
 * 工单评价服务
 *
 * @author chen
 * @Date 2025-09-23 10:07:17
 */
public interface IWorkOrderEvaluationService extends IService<WorkOrderEvaluationDTO> {
    // 新增评价
    boolean add(WorkOrderEvaluationSaveBO saveBO);

    // 更新评价
    boolean updateEvaluation(WorkOrderEvaluationSaveBO saveBO);

    // 逻辑删除评价（设置status=0）
    boolean logicDelete(Long id);

    // 根据工单ID查询评价
    WorkOrderEvaluationDTO getByOrderId(Long orderId);

    // 查询员工的所有有效评价
    Page<WorkOrderEvaluationVO> queryEmpEvaluations(WorkOrderEvaluationQueryBO bo);

    // 查询用户发起的所有有效评价
    Page<WorkOrderEvaluationVO> queryEvaluatorEvaluations(WorkOrderEvaluationQueryBO bo);
}
